<?php

include_once 'modelo/dbm.php';
include_once 'modelo/dbm.orm.php';
include_once 'modelo/conn.php';
include_once 'entidade/table_entity.php';
include_once 'entidade/pk_table_entity.php';
include_once 'entidade/entities.php';


header("Content-Type: text/html; charset=UTF-8");


// CRUDA

// Table to Class

// Abstract CRUD







$u = new ENTITY_usuario();
$u->setNome('nome');
$u->setLogin_usuario('u');
$u->setLogin_senha('senha');
$u->setIs_admin(1);
$u->setIs_fotografo(0);



try {
    $u->save();
    echo 'Salvo com sucesso!';
    
}  catch (DBM_DuplicateKeyException $ex) {
    echo "DBM_DuplicateKeyException: " . $ex;
    
}  catch (DBM_ForeignKeyConstraintException $ex) {
    echo "DBM_ForeignKeyConstraintException: " . $ex;
    
}  catch (DBException $ex) {
    echo "DBException: " . $ex;   
}


?>